package com.apexedu.eas.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.apexedu.framework.util.DBUtil;
import com.apexedu.framework.util.Pager;



@Repository
public class EasDBUtil {
	
	public <A> List<A> queryAllBeanList(String sql,Class<A> cls, Object... params) {
		return DBUtil.queryAllBeanList(sql, cls, params);
	}
	public List<Map<String, String>> queryForList(String sql, Object... params) {
		return DBUtil.queryForList(sql, params);
	}
	public List<Map<String, String>> queryForList(String sql) {
		return DBUtil.queryForList(sql);
	}
	public List<Map<String, String>> queryForList(Pager pager ,String sql, Object... params) {
		return DBUtil.queryForList(pager, sql, params);
	}
	public <A> List<A> queryPageBeanList(Pager pager ,String sql ,Class<A> cls, Object... params) {
		return DBUtil.queryPageBeanList(pager, sql, cls, params);
	}
	/*public List<Object []> queryPageList(Pager pager ,String sql, Object... params) {
		return DBUtil.queryPageList(pager, sql, params);
	}*/
	public <A> List<A> queryAllBeanList(String sql ,Class<A> cls) {
		return DBUtil.queryAllBeanList(sql, cls);
	}
	public <A> A queryBean(String sql ,Class<A> cls) {
		return DBUtil.queryBean(sql, cls);
	}
	public <A> A queryBean(String sql,Class<A> cls , Object... params) {
		return DBUtil.queryBean(sql, cls, params);
	}
	public int count(String sql, Object... params) {
		return DBUtil.count(sql, params);
	}
	public long countForLong(String sql, Object... params) {
		return DBUtil.countForLong(sql, params);
	}
	public Object queryFieldValue(String sql, Object... params) {
		return DBUtil.queryFieldValue(sql, params);
	}
	public int executeSQL(String sql, Object... params) {
		return DBUtil.executeSQL(sql, params);
	}

	
	
	
}
